package com.szsh.aiot.hsm.service.impl;


import com.szsh.aiot.common.core.text.Convert;
import com.szsh.aiot.hsm.domain.IFlowDiscern;
import com.szsh.aiot.hsm.mapper.IFlowDiscernMapper;
import com.szsh.aiot.hsm.service.IIFlowDiscernService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户网络防护信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-25
 */
@Service
public class IFlowDiscernServiceImpl implements IIFlowDiscernService
{
    @Autowired
    private IFlowDiscernMapper iFlowDiscernMapper;

    /**
     * 查询用户网络防护信息
     * 
     * @param serno 用户网络防护信息主键
     * @return 用户网络防护信息
     */
    @Override
    public IFlowDiscern selectIFlowDiscernBySerno(String serno)
    {
        return iFlowDiscernMapper.selectIFlowDiscernBySerno(serno);
    }

    /**
     * 查询用户网络防护信息列表
     * 
     * @param iFlowDiscern 用户网络防护信息
     * @return 用户网络防护信息
     */
    @Override
    public List<IFlowDiscern> selectIFlowDiscernList(IFlowDiscern iFlowDiscern)
    {
        return iFlowDiscernMapper.selectIFlowDiscernList(iFlowDiscern);
    }

    /**
     * 新增用户网络防护信息
     * 
     * @param iFlowDiscern 用户网络防护信息
     * @return 结果
     */
    @Override
    public int insertIFlowDiscern(IFlowDiscern iFlowDiscern)
    {
        return iFlowDiscernMapper.insertIFlowDiscern(iFlowDiscern);
    }

    /**
     * 修改用户网络防护信息
     * 
     * @param iFlowDiscern 用户网络防护信息
     * @return 结果
     */
    @Override
    public int updateIFlowDiscern(IFlowDiscern iFlowDiscern)
    {
        return iFlowDiscernMapper.updateIFlowDiscern(iFlowDiscern);
    }

    /**
     * 批量删除用户网络防护信息
     * 
     * @param sernos 需要删除的用户网络防护信息主键
     * @return 结果
     */
    @Override
    public int deleteIFlowDiscernBySernos(String sernos)
    {
        return iFlowDiscernMapper.deleteIFlowDiscernBySernos(Convert.toStrArray(sernos));
    }

    /**
     * 删除用户网络防护信息信息
     * 
     * @param serno 用户网络防护信息主键
     * @return 结果
     */
    @Override
    public int deleteIFlowDiscernBySerno(String serno)
    {
        return iFlowDiscernMapper.deleteIFlowDiscernBySerno(serno);
    }
}
